<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="generator" content="MATLAB R2017b"><meta http-equiv="X-UA-Compatible" content="IE=edge,IE=9,chrome=1"><title>Assignement C2* correction by S. Coniglio & J. Morlier</title><style type="text/css">
* {margin: 0; padding: 0;}
body {text-align: start; line-height: 17.234001159668px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-style: normal; font-size: 14px; font-weight: normal; text-decoration: none; white-space: normal; }
h1, h2 {font-weight: normal;}
.content { padding: 30px; }

.S0 { margin-left: 0px; margin-top: 0px; margin-bottom: 0px; margin-right: 0px;  }
.S1 { text-align: left; line-height: 26.4000015258789px; min-height: 24px; white-space: pre-wrap; color: rgb(213, 80, 0); font-family: Helvetica, Arial, sans-serif; font-size: 22px; white-space: pre-wrap; margin-left: 4px; margin-top: 3px; margin-bottom: 15px; margin-right: 10px;  }
.S2 { min-height: 0px; margin-left: 0px; margin-top: 0px; margin-bottom: 0px; margin-right: 0px;  }
.S3 { text-align: left; line-height: 20.576000213623px; min-height: 20px; white-space: pre-wrap; color: rgb(60, 60, 60); font-family: Helvetica, Arial, sans-serif; font-size: 16px; font-weight: bold; white-space: pre-wrap; margin-left: 4px; margin-top: 15px; margin-bottom: 9px; margin-right: 10px;  }
.S4 { margin-left: 3px; margin-top: 10px; margin-bottom: 10px; margin-right: 3px;  }
.S5 { min-height: 18px; white-space: nowrap; white-space: nowrap; margin-left: 0px; margin-top: 0px; margin-bottom: 0px; margin-right: 0px;  }
.S6 { min-height: 0px; white-space: pre; white-space: pre; margin-left: 0px; margin-top: 0px; margin-bottom: 0px; margin-right: 45.0000038146973px;  }
.S7 { color: rgb(34, 139, 34); margin-left: 0px; margin-top: 0px; margin-bottom: 0px; margin-right: 0px;  }
.S8 { color: rgb(160, 32, 240); margin-left: 0px; margin-top: 0px; margin-bottom: 0px; margin-right: 0px;  }
.S9 { color: rgb(64, 64, 64); margin-left: 0px; margin-top: 0px; margin-bottom: 0px; margin-right: 0px;  }
.S10 { text-align: left; line-height: 21px; min-height: 17px; white-space: pre-wrap; font-family: Helvetica, Arial, sans-serif; white-space: pre-wrap; margin-left: 4px; margin-top: 10px; margin-bottom: 9px; margin-right: 10px;  }
.S11 { font-style: italic; margin-left: 0px; margin-top: 0px; margin-bottom: 0px; margin-right: 0px;  }
.S12 { text-align: left; line-height: 21px; min-height: 17px; white-space: pre-wrap; font-family: Helvetica, Arial, sans-serif; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px;  }
.S13 { text-align: center; line-height: 21px; min-height: 17px; white-space: pre-wrap; font-family: Helvetica, Arial, sans-serif; white-space: pre-wrap; margin-left: 4px; margin-top: 10px; margin-bottom: 9px; margin-right: 10px;  }
.S14 { text-align: center; line-height: 21px; min-height: 17px; white-space: pre-wrap; font-family: Helvetica, Arial, sans-serif; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px;  }

.CodeBlock {margin: 10px 0 10px 0; background-color: #F7F7F7;}
.CodeBlock+.paragraphNode {margin-top: 10px;}
.lineNode {padding-left: 10px; border-left: 1px solid #E9E9E9; border-right: 1px solid #E9E9E9;}
.inlineWrapper:first-child .lineNode,.inlineWrapper.outputs+.inlineWrapper .lineNode {padding-top: 5px; border-top: 1px solid #E9E9E9;}
.inlineWrapper:last-child .lineNode,.inlineWrapper.outputs .lineNode {padding-bottom: 5px; border-bottom: 1px solid #E9E9E9;}
.lineNode .textBox {white-space: pre;}
.outputGroup {margin: 2px 0 2px 0; padding: 2px 2px 2px 4px;}
.outputRegion {}
.outputParagraph {color: rgba(64, 64, 64, 1); padding: 10px 0 6px 17px; background: white; overflow-x: hidden;}
.inlineWrapper:last-child .outputParagraph {border-bottom-left-radius: 4px; border-bottom-right-radius: 4px;}
.outputParagraph:empty {margin: 0;}
.inlineElement .symbolicElement {margin-top: 1px; margin-bottom: 1px;}
.embeddedOutputsSymbolicElement .MathEquation {margin-top: 4px; margin-bottom: 4px;}
.embeddedOutputsSymbolicElement .MathEquation.displaySymbolicElement {margin-left: 15px;}
.embeddedOutputsSymbolicElement .MathEquation.inlineSymbolicElement {}
.embeddedOutputsSymbolicElement {overflow-x: auto; overflow-y: auto;}
.embeddedOutputsSymbolicElement { overflow: initial !important;}
.embeddedOutputsTextElement,.embeddedOutputsVariableStringElement {white-space: pre; word-wrap: initial; min-height: 18px; max-height: 250px; overflow: auto;}
.textElement,.rtcDataTipElement .textElement {padding-top: 3px;}
.embeddedOutputsTextElement.inlineElement,.embeddedOutputsVariableStringElement.inlineElement {}
.inlineElement .textElement {}
.embeddedOutputsTextElement,.embeddedOutputsVariableStringElement { max-height: none !important; overflow: initial !important;}
.veSpecifier {}
.veContainer {}
.veSpecifierBox {height: 400px; width: 500px;}
.veSpecifier .veTable {padding-top: 3px; padding-bottom: 4px;}
.veSpecifierBox .veSpecifier .veContainer {position: relative; width: 100%; height: 370px;}
.veSpecifierBox .dijitDialogPaneContent {width: 97% !important; height: 88% !important;}
.veSpecifier .veTable .rowHeadersWrapper {padding-bottom: 0;}
.veSpecifier .veTable .scroller .variableEditorRenderers {padding-right: 3px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none;}
.veSpecifier .veTable .topHeaderWrapper,.veSpecifier .veTable .bottomRowHeaderWrapper {visibility: hidden; z-index: 0;}
.veMetaSummary {font-style: italic;}
.veSpecifier .veTable .scroller {overflow: hidden;}
.veSpecifier .veTable:hover .scroller {overflow: auto;}
.veSpecifier .veVariableName,.veSpecifier .veDimensionFont {font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12px;}
.veSpecifier .veVariableName {padding-top: 2px;}
.veSpecifier .veDimensionFont {font-style: italic; color: #9A9A9A;}
.veSpecifier .scroller::-webkit-scrollbar-track {background-color: white;}
.veSpecifier .scroller::-webkit-scrollbar-corner {background-color: white;}
.veSpecifier .veTable .topRowHeaderWrapper {border: none; background-color: #F8F9FA;}
.veSpecifier .mw_type_ListBase.showCellBorders,.veSpecifier .veTable .topHeaderWrapper,.veSpecifier .veTable .bottomRowHeaderWrapper,.veSpecifier .veTable .verticalScrollSpacer,.veSpecifier .veTable .horizontalScrollSpacer {border: none;}
.veSpecifier .veTable .dataScrollerNode {border: 1px solid #BFBFBF;}
.veSpecifier .veTable .columnHeaderNode,.veSpecifier .veTable .rowHeaderNode,.veSpecifier .veTable .dataBody {font-family: Arial; font-size: 13px;}
.veSpecifier .veTable .columnHeaderNode,.veSpecifier .veTable .rowHeaderNode {color: #7F7F7F;}
.veSpecifier .veTable .dataBody {color: #000000;}
.veSpecifier .veTable .columnHeaderNode .cell .drag,.veSpecifier .veTable .columnHeaderNode .cell .header,.veSpecifier .veTable .topHeaderWrapper,.veSpecifier .veTable .bottomRowHeaderWrapper {background-color: #F8F9FA;}
.veSpecifier .veTable .columnHeaderNode .cell .dragBorder {border-right: 1px solid #F8F9FA;}
.veSpecifier .veTable .rowHeaderNode .cell {padding-top: 3px; text-align: center; border-bottom: 1px solid #F8F9FA;}
.veSpecifier .veTable .dataBody .cell .plainText {text-align: right;}
.veSpecifier .veTable .dataBody .row .cell {border-bottom: 1px solid #E9E9E9; border-right: 1px solid #E9E9E9;}
.embeddedOutputsVariableElement {white-space: pre-wrap; word-wrap: break-word; min-height: 18px; max-height: 250px; overflow: auto;}
.variableElement {}
.embeddedOutputsVariableElement.inlineElement {}
.inlineElement .variableElement {}
.variableNameElement {margin-bottom: 3px; display: inline-block;}
.variableValue { width: 100% !important; }
.embeddedOutputsMatrixElement {min-height: 18px; box-sizing: border-box;}
.embeddedOutputsMatrixElement .matrixElement,.rtcDataTipElement .matrixElement {position: relative;}
.matrixElement .variableValue,.rtcDataTipElement .matrixElement .variableValue {white-space: pre; display: inline-block; vertical-align: top; overflow: hidden;}
.embeddedOutputsMatrixElement.inlineElement {}
.embeddedOutputsMatrixElement.inlineElement .topHeaderWrapper {display: none;}
.embeddedOutputsMatrixElement.inlineElement .veTable .body {padding-top: 0 !important; max-height: 100px;}
.inlineElement .matrixElement {max-height: 300px;}
.embeddedOutputsMatrixElement .matrixElement .valueContainer,.rtcDataTipElement .matrixElement .valueContainer {white-space: nowrap; margin-bottom: 3px;}
.embeddedOutputsMatrixElement .matrixElement .valueContainer .horizontalEllipsis.hide,.embeddedOutputsMatrixElement .matrixElement .verticalEllipsis.hide,.rtcDataTipElement .matrixElement .valueContainer .horizontalEllipsis.hide,.rtcDataTipElement .matrixElement .verticalEllipsis.hide {display: none;}
.embeddedOutputsMatrixElement .matrixElement .valueContainer .horizontalEllipsis {margin-bottom: -3px;}
.matrixElement { max-height: none !important; }
.embeddedOutputsVariableTableElement .ClientViewDiv table tr {height: 22px; white-space: nowrap;}
.embeddedOutputsVariableTableElement .ClientViewDiv table thead tr th {border-width: 1px 0px 1px 1px;}
.embeddedOutputsVariableTableElement .ClientViewDiv table {border-spacing: 0px; border: 1px solid #bfbfbf; border-width: 0px 1px 0px 0px;}
.embeddedOutputsVariableTableElement .ClientViewDiv table tr td,.embeddedOutputsVariableTableElement .ClientViewDiv table tr th {min-width : 75px; max-width : 75px; background-color:white; border: 1px solid #bfbfbf; text-overflow: ellipsis; border-width: 0px 0px 1px 1px; font-family: 'Arial', sans-serif; font-size: 12px; overflow : hidden;}
.embeddedOutputsVariableTableElement .ClientViewDiv table tbody tr th {width: 34px; max-width: 100px;}
.embeddedOutputsVariableTableElement .ClientViewDiv table tr span {text-overflow: ellipsis; padding: 3px;}
.embeddedOutputsVariableTableElement .ClientViewDiv table tr th {background: #f5f5f5; color: rgba(0,0,0,0.5); padding: 3px; font-size: 9px;}
.embeddedOutputsVariableTableElement .ClientViewDiv table tr th:first-child {min-width: 28px; max-width: 250px;}
.dijitTooltipDialog .dijitTooltipContainer .dijitTooltipContents .alertPlugin-alertMessage {min-width: 12px; max-width: 400px; max-height: 300px; overflow: auto;}
.dijitTooltipDialog .alertPlugin-alertMessage::-webkit-scrollbar {width: 11px; height: 11px;}
.dijitTooltipDialog .alertPlugin-alertMessage::-webkit-scrollbar-track {background-color: rgba(0, 0, 0, 0);}
.dijitTooltipDialog .alertPlugin-alertMessage::-webkit-scrollbar-corner {background-color: rgba(0, 0, 0, 0);}
.dijitTooltipDialog .alertPlugin-alertMessage::-webkit-scrollbar-thumb {border-radius: 7px; background-color: rgba(0, 0, 0, 0.1); border: 2px solid rgba(0, 0, 0, 0); background-clip: padding-box;}
.dijitTooltipDialog .alertPlugin-alertMessage::-webkit-scrollbar-thumb:hover {background-color: rgba(0, 0, 0, 0.2);}
.dijitTooltipDialog .alertPlugin-alertMessage::-webkit-scrollbar-thumb {background-color: rgba(0, 0, 0, 0);}
.dijitTooltipDialog .alertPlugin-alertMessage:hover::-webkit-scrollbar-thumb {background-color: rgba(0, 0, 0, 0.1);}
.dijitTooltipDialog .alertPlugin-alertMessage:hover::-webkit-scrollbar-thumb:hover {background-color: rgba(0, 0, 0, 0.2);}
.alertPlugin-alertLine {position: absolute; display: initial; width: 40px; text-align: right; cursor: text;}
.alertPlugin-onTextLine {visibility: hidden;}
.alertPlugin-hasTooltip .alertPlugin-warningImg,.alertPlugin-hasTooltip .alertPlugin-errorImg {cursor: pointer;}
.alertPlugin-alertLine .alertPlugin-warningElement,.alertPlugin-alertLine .alertPlugin-errorElement {display: inline-block; margin-right: 4px;}
.alertPlugin-isStale {-webkit-filter: opacity(0.4) grayscale(80%); filter: opacity(0.4) grayscale(80%);}
.diagnosticMessage-wrapper {font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12px;}
.diagnosticMessage-wrapper.diagnosticMessage-warningType {color: rgb(255,100,0);}
.diagnosticMessage-wrapper.diagnosticMessage-warningType a {color: rgb(255,100,0); text-decoration: underline;}
.diagnosticMessage-wrapper.diagnosticMessage-errorType {color: rgb(230,0,0);}
.diagnosticMessage-wrapper.diagnosticMessage-errorType a {color: rgb(230,0,0); text-decoration: underline;}
.diagnosticMessage-wrapper .diagnosticMessage-messagePart {white-space: pre-wrap;}
.diagnosticMessage-wrapper .diagnosticMessage-stackPart {white-space: pre;}
.embeddedOutputsWarningElement{min-height: 18px; max-height: 250px; overflow: auto;}
.embeddedOutputsWarningElement.inlineElement {}
.embeddedOutputsErrorElement {min-height: 18px; max-height: 250px; overflow: auto;}
.embeddedOutputsErrorElement.inlineElement {}
.variableNameElement .headerElement {color: rgb(179, 179, 179); font-style: italic;}
.variableNameElement .headerElement .headerDataType {color: rgb(147, 176, 230);}
.matrixElement .horizontalEllipsis,.rtcDataTipElement .matrixElement .horizontalEllipsis {display: inline-block; margin-top: 3px; content: url("");}
.matrixElement .verticalEllipsis,.textElement .verticalEllipsis,.rtcDataTipElement .matrixElement .verticalEllipsis,.rtcDataTipElement .textElement .verticalEllipsis {margin-left: 35px; content: url("");}
</style></head><body><div class = "content"><div class = 'SectionBlock containment active'><h1 class = "S1"><span class = "S2"><span class="S0">Assignement C2* correction by S. Coniglio &amp; J. Morlier</span></span></h1><h2 class = "S3"><span class = "S2"><span class="S0">May 2018</span></span></h2><div class = 'CodeBlock contiguous'><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S7">%Initialization of Variables</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">clear </span><span class="S8">all</span><span class="S0">; close </span><span class="S8">all</span><span class="S0">;</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">format </span><span class="S8">long</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">Eb = 3.2e10; </span><span class="S7">% Beam [Pa]</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">Ea = 2.0e11; </span><span class="S7">% Bar [Pa]</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">L =3; </span><span class="S7">% Beam [m]</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">h =0.3; </span><span class="S7">% Beam [m]</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">Ap = h^2; </span><span class="S7">% Beam [m*m]</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">I = h^4/12; </span><span class="S7">%Beam [m^4]</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">Ab = .0025; </span><span class="S7">% Bar [m*m]</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">Lb = L/2; </span><span class="S7">% Bar [m]</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">q0 = 10e3; </span><span class="S7">% N/m</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0"></span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0"></span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S7">% Stifness matrix Beam</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">Kf = Eb*I/L^3*[12	6*L	-12	6*L;</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">6*L 4*L^2 -6*L 2*L^2 ;-12 -6*L	12 -6*L;</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">6*L 2*L^2 -6*L 4*L^2];</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0"></span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0"></span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0"></span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S7">%PART1</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">F=[0 0 -75000 0]';</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0"></span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S7">%Reduced system to solve in the global/local axis</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">K1=Kf(3:4,3:4); </span><span class="S7">%MN/m</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">F1=F(3:4);</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">U1=K1\F1;</span></span></div></div><div class = 'inlineWrapper outputs'><div class = "S5 lineNode"><span class = "S6"><span class="S0">U1(1)</span><span class="S7">%m;</span></span></div><div class="outputParagraph" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 14px;"><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="209776A1" data-testid="output_0" data-width="1480" data-height="34" style="width: 1510px; max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div class="textElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><span class="variableNameElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">ans = </span></div><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">  -0.031250000000000
</div></div></div></div></div><div class = 'inlineWrapper outputs'><div class = "S5 lineNode"><span class = "S6"><span class="S0">U1(2)</span><span class="S7">%rad;				</span></span></div><div class="outputParagraph" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 14px;"><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="D1FC104A" data-testid="output_1" data-width="1480" data-height="34" style="width: 1510px; max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div class="textElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><span class="variableNameElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">ans = </span></div><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">  -0.015625000000000
</div></div></div></div></div></div><div class = "S10"><span class = "S2"><span class="S11">v </span></span><span class = "S2"><span class="S0">= −</span></span><span class = "S2"><span class="S11">3.125 cm</span></span></div><div class = "S12"><span class = "S2"><span class="S0">θ = −</span></span><span class = "S2"><span class="S11">1.563 10</span></span><span class = "S2"><span class="S0">−</span></span><span class = "S2"><span class="S11">2 </span></span><span class = "S2"><span class="S11">rad </span></span></div><div class = "S12"><span class = "S2"><span class="S0"></span></span></div><div class = 'CodeBlock contiguous'><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S7">%Check the reaction forces</span></span></div></div><div class = 'inlineWrapper outputs'><div class = "S5 lineNode"><span class = "S6"><span class="S0">Ue=[0 0 U1']'</span></span></div><div class="outputParagraph" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 14px;"><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="9B0A9C25" data-testid="output_2" data-width="1480" data-height="78" style="width: 1510px; max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div class="textElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><span class="variableNameElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">Ue = </span></div><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">                   0
                   0
  -0.031250000000000
  -0.015625000000000
</div></div></div></div></div><div class = 'inlineWrapper outputs'><div class = "S5 lineNode"><span class = "S6"><span class="S0">Fe=Kf*Ue					</span></span></div><div class="outputParagraph" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 14px;"><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="AC26ED9E" data-testid="output_3" data-width="1480" data-height="107" style="width: 1510px; max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div class="textElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><span class="variableNameElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">Fe = </span></div><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">   1.0e+05 *

   0.750000000000001
   2.250000000000002
  -0.750000000000001
   0.000000000000000
</div></div></div></div></div></div><div class = "S10"><span class = "S2"><span class="S0"> </span></span><span class = "S2"><span class="S11">Rz = 75 KN and</span></span><span class = "S2"><span class="S0"> </span></span><span class = "S2"><span class="S11">My = 225 KNm (75KN </span></span><span class = "S2"><span class="S0">× </span></span><span class = "S2"><span class="S11">3m) </span></span></div><div class = "S12"><span class = "S2"><span class="S0"></span></span></div><div class = 'CodeBlock contiguous'><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0"></span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0"></span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S7">%PART2</span></span></div></div><div class = 'inlineWrapper outputs'><div class = "S5 lineNode"><span class = "S6"><span class="S0">warning </span><span class="S8">q0</span><span class="S8"> is in KN/m</span></span></div><div class="outputParagraph" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 14px;"><div class="inlineElement eoOutputWrapper embeddedOutputsWarningElement" uid="0A438C62" data-testid="output_4" data-width="1480" data-height="18" style="width: 1510px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div class="diagnosticMessage-wrapper diagnosticMessage-warningType" style="white-space: normal; font-style: normal; color: rgb(255, 100, 0); font-size: 12.4415998458862px;"><div class="diagnosticMessage-messagePart" style="white-space: pre-wrap; font-style: normal; color: rgb(255, 100, 0); font-size: 12.4415998458862px;">Warning: q0</div><div class="diagnosticMessage-stackPart" style="white-space: pre; font-style: normal; color: rgb(255, 100, 0); font-size: 12.4415998458862px;"></div></div></div></div></div></div><div class = "S13"><img class="imageNode" width="451" height="271" style="vertical-align: baseline" src=""></div><div class = "S12"><span class = "S2"><span class="S0">Part of the job was to find equivalence forces for the distributed load ! see class exercice and script on github. You can find the results in the next figure.</span></span></div><div class = "S12"><span class = "S2"><span class="S0">Then discretize the structure use only 2 elements: 1 beam and 1 bar.</span></span></div><div class = "S14"><img class="imageNode" width="502" height="496" style="vertical-align: baseline" src=""></div><div class = 'CodeBlock contiguous'><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">  </span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S7">% Stiffness matrix beam</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">Kf = Eb*I/L^3*[12	6*L	-12	6*L;</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">6*L 4*L^2 -6*L 2*L^2 ;-12 -6*L	12 -6*L;</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">6*L 2*L^2 -6*L 4*L^2];</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0"></span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S7">% add axial behaviour</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">Ka=Eb*Ap/L*[1 -1; -1 1];</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S7">% axial bending behaviour</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">Kp([ 2 3 5 6 ] , [2 3 5 6 ]) = Kf; Kp([1 4], [1 4 ]) = Ka;</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S7">% augmnented bar </span></span></div></div><div class = 'inlineWrapper outputs'><div class = "S5 lineNode"><span class = "S6"><span class="S0">Kb = zeros(6); Kb([1 4 ], [1 4]) =Ea*Ab/Lb*[ 1 -1; -1 1]</span></span></div><div class="outputParagraph" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 14px;"><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="30DF801C" data-testid="output_5" data-width="1480" data-height="136" style="width: 1510px; max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div class="textElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><span class="variableNameElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">Kb = </span></div><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">   1.0e+08 *

   3.333333333333333                   0                   0  -3.333333333333333                   0                   0
                   0                   0                   0                   0                   0                   0
                   0                   0                   0                   0                   0                   0
  -3.333333333333333                   0                   0   3.333333333333333                   0                   0
                   0                   0                   0                   0                   0                   0
                   0                   0                   0                   0                   0                   0
</div></div></div></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0"></span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S7">%Rotation (45)</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">c = sqrt(1/2); s = sqrt(1/2); r=[c s 0;</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">    -s c 0;</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">0 0 1];</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0"></span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">R = kron(eye(2),r); </span><span class="S7">%Simpliciation</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">Kb=(R)'*Kb*R;</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0"></span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S7">% Assembly</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">K = zeros(9);</span></span></div></div><div class = 'inlineWrapper outputs'><div class = "S5 lineNode"><span class = "S6"><span class="S0">K(1:6 , 1:6 ) = K(1:6 , 1:6 )+Kp</span></span></div><div class="outputParagraph" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 14px;"><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="218BABCF" data-testid="output_6" data-width="1480" data-height="179" style="width: 1510px; max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div class="textElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><span class="variableNameElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">K = </span></div><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">   1.0e+08 *

   9.600000000000000                   0                   0  -9.600000000000000                   0                   0                   0                   0                   0
                   0   0.096000000000000   0.144000000000000                   0  -0.096000000000000   0.144000000000000                   0                   0                   0
                   0   0.144000000000000   0.288000000000000                   0  -0.144000000000000   0.144000000000000                   0                   0                   0
  -9.600000000000000                   0                   0   9.600000000000000                   0                   0                   0                   0                   0
                   0  -0.096000000000000  -0.144000000000000                   0   0.096000000000000  -0.144000000000000                   0                   0                   0
                   0   0.144000000000000   0.144000000000000                   0  -0.144000000000000   0.288000000000000                   0                   0                   0
                   0                   0                   0                   0                   0                   0                   0                   0                   0
                   0                   0                   0                   0                   0                   0                   0                   0                   0
                   0                   0                   0                   0                   0                   0                   0                   0                   0
</div></div></div></div></div><div class = 'inlineWrapper outputs'><div class = "S5 lineNode"><span class = "S6"><span class="S0">K(4:9 , 4:9 ) = K(4:9 , 4:9 )+Kb</span></span></div><div class="outputParagraph" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 14px;"><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="9D3250AD" data-testid="output_7" data-width="1480" data-height="179" style="width: 1510px; max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div class="textElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><span class="variableNameElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">K = </span></div><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">   1.0e+09 *

   0.960000000000000                   0                   0  -0.960000000000000                   0                   0                   0                   0                   0
                   0   0.009600000000000   0.014400000000000                   0  -0.009600000000000   0.014400000000000                   0                   0                   0
                   0   0.014400000000000   0.028800000000000                   0  -0.014400000000000   0.014400000000000                   0                   0                   0
  -0.960000000000000                   0                   0   1.126666666666667   0.166666666666667                   0  -0.166666666666667  -0.166666666666667                   0
                   0  -0.009600000000000  -0.014400000000000   0.166666666666667   0.176266666666667  -0.014400000000000  -0.166666666666667  -0.166666666666667                   0
                   0   0.014400000000000   0.014400000000000                   0  -0.014400000000000   0.028800000000000                   0                   0                   0
                   0                   0                   0  -0.166666666666667  -0.166666666666667                   0   0.166666666666667   0.166666666666667                   0
                   0                   0                   0  -0.166666666666667  -0.166666666666667                   0   0.166666666666667   0.166666666666667                   0
                   0                   0                   0                   0                   0                   0                   0                   0                   0
</div></div></div></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0"></span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S7">% BCs</span></span></div></div></div><div class = "S10"><span class = "S2"><span class="S0">	The obvious support conditions are at node 1 and 3, i.e. </span></span><span class = "S2"><span class="S11">u</span></span><span class = "S2"><span class="S0">1</span></span><span class = "S2"><span class="S11">Z </span></span><span class = "S2"><span class="S0">= </span></span><span class = "S2"><span class="S0">0, </span></span><span class = "S2"><span class="S0">φ</span></span><span class = "S2"><span class="S0">1</span></span><span class = "S2"><span class="S11">Y </span></span><span class = "S2"><span class="S0">= </span></span><span class = "S2"><span class="S0">0 and </span></span><span class = "S2"><span class="S11">u</span></span><span class = "S2"><span class="S0">3</span></span><span class = "S2"><span class="S11">X </span></span><span class = "S2"><span class="S0">= </span></span><span class = "S2"><span class="S11">u</span></span><span class = "S2"><span class="S0">3</span></span><span class = "S2"><span class="S11">Z </span></span><span class = "S2"><span class="S0">= </span></span><span class = "S2"><span class="S0">0. However, it is also important to consider that the beam cannot have anyelongationinthe</span></span><span class = "S2"><span class="S11">X</span></span><span class = "S2"><span class="S0">-directionatnode2:</span></span><span class = "S2"><span class="S11">u</span></span><span class = "S2"><span class="S0">2</span></span><span class = "S2"><span class="S11">X </span></span><span class = "S2"><span class="S0">=</span></span><span class = "S2"><span class="S0">0. </span></span></div><div class = "S12"><span class = "S2"><span class="S0">	</span></span></div><div class = 'CodeBlock contiguous'><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">i=[1,2,3,4,7,8,9];</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">Kreduced=K;</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">Kreduced(:,i) = []; </span></span></div></div><div class = 'inlineWrapper outputs'><div class = "S5 lineNode"><span class = "S6"><span class="S0">Kreduced(i,:) = []</span></span></div><div class="outputParagraph" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 14px;"><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="31E606B1" data-testid="output_8" data-width="1480" data-height="78" style="width: 1510px; max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div class="textElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><span class="variableNameElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">Kreduced = </span></div><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">   1.0e+08 *

   1.762666666666667  -0.144000000000000
  -0.144000000000000   0.288000000000000
</div></div></div></div></div></div><div class = "S10"><span class = "S2"><span class="S0">Handwritten gives K_theory</span></span></div><div class = "S14"><img class="imageNode" width="508" height="142" style="vertical-align: baseline" src=""></div><div class = 'CodeBlock contiguous'><div class = 'inlineWrapper outputs'><div class = "S5 lineNode"><span class = "S6"><span class="S0">K_theory=[(12*Eb*I/(L^3))+(Ea*Ab)/(L) -6*Eb*I/(L^2); -6*Eb*I/(L^2) 4*Eb*I/(L)]</span></span></div><div class="outputParagraph" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 14px;"><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="EB6E743E" data-testid="output_9" data-width="1480" data-height="78" style="width: 1510px; max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div class="textElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><span class="variableNameElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">K_theory = </span></div><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">   1.0e+08 *

   1.762666666666667  -0.144000000000000
  -0.144000000000000   0.288000000000000
</div></div></div></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">f = [ 0;0;0;0 ;-75e3 + -7*q0*L/20 ; -1*q0*L*L ;0 ;0 ;0];</span><span class="S7">%Assembly of ecternal forces</span></span></div></div><div class = 'inlineWrapper outputs'><div class = "S5 lineNode"><span class = "S6"><span class="S0">freduced=[-75e3 + -7*q0*L/20 ; -1*q0*L*L]</span></span></div><div class="outputParagraph" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 14px;"><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="A4BE06DC" data-testid="output_10" data-width="1480" data-height="49" style="width: 1510px; max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div class="textElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><span class="variableNameElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">freduced = </span></div><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">      -85500
      -90000
</div></div></div></div></div><div class = 'inlineWrapper outputs'><div class = "S5 lineNode"><span class = "S6"><span class="S0">Ureduced = Kreduced\freduced</span><span class="S7">%solution</span></span></div><div class="outputParagraph" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 14px;"><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="143BB770" data-testid="output_11" data-width="1480" data-height="49" style="width: 1510px; max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div class="textElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><span class="variableNameElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">Ureduced = </span></div><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">  -0.000771884858044
  -0.003510942429022
</div></div></div></div></div></div><div class = "S10"><span class = "S2"><span class="S11">Stiff ! isn't it?</span></span></div><div class = 'CodeBlock contiguous'><div class = 'inlineWrapper outputs'><div class = "S5 lineNode"><span class = "S6"><span class="S0">U_theory = K_theory\freduced  </span><span class="S7">%solution</span></span></div><div class="outputParagraph" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 14px;"><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="845135EA" data-testid="output_12" data-width="1480" data-height="49" style="width: 1510px; max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div class="textElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><span class="variableNameElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">U_theory = </span></div><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">  -0.000771884858044
  -0.003510942429022
</div></div></div></div></div></div><div class = "S10"><span class = "S2"><span class="S0"></span></span></div><div class = "S12"><span class = "S2"><span class="S0">Internal forces:</span></span></div><div class = "S12"><span class = "S2"><span class="S0">Here we compute the internal force in the global coordinate system</span></span></div><div class = 'CodeBlock contiguous'><div class = 'inlineWrapper outputs'><div class = "S5 lineNode"><span class = "S6"><span class="S0">Fbeam = Kp * [0 0 0 0 Ureduced' ]' </span><span class="S7">%[Fx1 Fy1 Mz1 Fx2 Fy2 Mz2]</span></span></div><div class="outputParagraph" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 14px;"><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="61BC981B" data-testid="output_13" data-width="1480" data-height="136" style="width: 1510px; max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div class="textElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><span class="variableNameElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">Fbeam = </span></div><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">   1.0e+04 *

                   0
  -4.314747634069400
  -3.944242902208202
                   0
   4.314747634069400
  -8.999999999999998
</div></div></div></div></div></div><div class = "S10"><span class = "S2"><span class="S0">Beam in compression -43kN</span></span></div><div class = 'CodeBlock contiguous'><div class = 'inlineWrapper outputs'><div class = "S5 lineNode"><span class = "S6"><span class="S0">Fbar = Kb * [ 0 Ureduced' 0 0 0]' </span><span class="S7">%[Fx2 Fy2 Mz2 Fx3 Fy3 Mz3]</span></span></div><div class="outputParagraph" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 14px;"><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="6FA609B2" data-testid="output_14" data-width="1480" data-height="136" style="width: 1510px; max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div class="textElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><span class="variableNameElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">Fbar = </span></div><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">   1.0e+05 *

  -1.286474763406940
  -1.286474763406940
                   0
   1.286474763406940
   1.286474763406940
                   0
</div></div></div></div></div></div><div class = "S10"><span class = "S2"><span class="S0">To know the bar stress state one can compute the local displacement using the rotation matrix that traduces the bar global displacement into the local one.</span></span></div><div class = 'CodeBlock contiguous'><div class = 'inlineWrapper outputs'><div class = "S5 lineNode"><span class = "S6"><span class="S0">ub_local=R*[ 0 Ureduced' 0 0 0]' </span><span class="S7">%[ul1 vl1 thetal1 ul2 vl2 thetal12] where l1==2 and l2==3</span></span></div><div class="outputParagraph" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 14px;"><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="0D4D5638" data-testid="output_15" data-width="1480" data-height="107" style="width: 1510px; max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div class="textElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><span class="variableNameElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">ub_local = </span></div><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">  -0.000545805017418
  -0.000545805017418
  -0.003510942429022
                   0
                   0
                   0
</div></div></div></div></div></div><div class = "S10"><span class = "S2"><span class="S0">the axial displacements necessary for the bar internal stress post processig are the only components 1 and 4:</span></span></div><div class = 'CodeBlock contiguous'><div class = 'inlineWrapper outputs'><div class = "S5 lineNode"><span class = "S6"><span class="S0">ub_axial=ub_local([1,4]) </span><span class="S7">%[ul1 ul2]</span></span></div><div class="outputParagraph" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 14px;"><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="1448FA18" data-testid="output_16" data-width="1480" data-height="78" style="width: 1510px; max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div class="textElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><span class="variableNameElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">ub_axial = </span></div><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">   1.0e-03 *

  -0.545805017418244
                   0
</div></div></div></div></div></div><div class = "S10"><span class = "S2"><span class="S0">the bar axial deformation </span></span><span style="vertical-align:-6px"><img src="" width="58" height="20.5" /></span><span class = "S2"><span class="S0">  can be computed using the strain displacement matrix (introduced during lectures):</span></span></div><div class = 'CodeBlock contiguous'><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">B_bar=[-1/Lb 1/Lb]; </span><span class="S7">% strain displacement matrix of the linear bar element</span></span></div></div><div class = 'inlineWrapper outputs'><div class = "S5 lineNode"><span class = "S6"><span class="S0">eps_bar=B_bar*ub_axial</span></span></div><div class="outputParagraph" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 14px;"><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="B770489E" data-testid="output_17" data-width="1480" data-height="34" style="width: 1510px; max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div class="textElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><span class="variableNameElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">eps_bar = </span></div><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">     3.638700116121627e-04
</div></div></div></div></div></div><div class = "S10"><span class = "S2"><span class="S0">That means that the bar is in traction, for the stress </span></span><span style="vertical-align:-6px"><img src="" width="71" height="20.5" /></span><span class = "S2"><span class="S0"> (the stress strain matrix D here is a scalar):</span></span></div><div class = 'CodeBlock contiguous'><div class = 'inlineWrapper outputs'><div class = "S5 lineNode"><span class = "S6"><span class="S0">sigma_bar=Eb*eps_bar </span><span class="S7">%Pa</span></span></div><div class="outputParagraph" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 14px;"><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="336A094A" data-testid="output_18" data-width="1480" data-height="34" style="width: 1510px; max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div class="textElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><span class="variableNameElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">sigma_bar = </span></div><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">     1.164384037158921e+07
</div></div></div></div></div></div><div class = "S10"><span class = "S2"><span class="S0">finally the normal load is </span></span><span style="vertical-align:-6px"><img src="" width="64.5" height="20.5" /></span></div><div class = 'CodeBlock contiguous'><div class = 'inlineWrapper outputs'><div class = "S5 lineNode"><span class = "S6"><span class="S0">InternalFbar= Ab*sigma_bar </span><span class="S7">%N</span></span></div><div class="outputParagraph" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 14px;"><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="226445B6" data-testid="output_19" data-width="1480" data-height="34" style="width: 1510px; max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div class="textElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><span class="variableNameElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">InternalFbar = </span></div><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">     2.910960092897302e+04
</div></div></div></div></div></div><div class = "S10"><span class = "S2"><span class="S0">The Bar is in traction  state 29KN are applied to both extremities in opposite directions along the bar axis direction. </span></span></div><div class = 'CodeBlock contiguous'><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S7">%partionned</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S7">%   Special case: ALL imposed displacements are zero </span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S7">% (Ub = 0)</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">freedofs=</span><span class="S0">[</span><span class="S0">5:6];</span></span></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0">constraineddofs=[1:4 7:9];</span></span></div></div><div class = 'inlineWrapper outputs'><div class = "S5 lineNode"><span class = "S6"><span class="S0">Kaa=K(freedofs,freedofs)</span></span></div><div class="outputParagraph" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 14px;"><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="B408B367" data-testid="output_20" data-width="1480" data-height="78" style="width: 1510px; max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div class="textElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><span class="variableNameElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">Kaa = </span></div><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">   1.0e+08 *

   1.762666666666667  -0.144000000000000
  -0.144000000000000   0.288000000000000
</div></div></div></div></div><div class = 'inlineWrapper outputs'><div class = "S5 lineNode"><span class = "S6"><span class="S0">Kba=K(constraineddofs,freedofs)</span></span></div><div class="outputParagraph" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 14px;"><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="9FF81F36" data-testid="output_21" data-width="1480" data-height="150" style="width: 1510px; max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div class="textElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><span class="variableNameElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">Kba = </span></div><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">   1.0e+08 *

                   0                   0
  -0.096000000000000   0.144000000000000
  -0.144000000000000   0.144000000000000
   1.666666666666667                   0
  -1.666666666666667                   0
  -1.666666666666667                   0
                   0                   0
</div></div></div></div></div><div class = 'inlineWrapper outputs'><div class = "S5 lineNode"><span class = "S6"><span class="S0">fa=f(freedofs)</span></span></div><div class="outputParagraph" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 14px;"><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="60A69D84" data-testid="output_22" data-width="1480" data-height="49" style="width: 1510px; max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div class="textElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><span class="variableNameElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">fa = </span></div><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">      -85500
      -90000
</div></div></div></div></div><div class = 'inlineWrapper outputs'><div class = "S5 lineNode"><span class = "S6"><span class="S0">Ua=</span><span class="S0">inv</span><span class="S0">(Kaa)*fa</span></span></div><div class="outputParagraph" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 14px;"><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="E1703FFD" data-testid="output_23" data-width="1480" data-height="49" style="width: 1510px; max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div class="textElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><span class="variableNameElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">Ua = </span></div><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">  -0.000771884858044
  -0.003510942429022
</div></div></div></div></div><div class = 'inlineWrapper outputs'><div class = "S5 lineNode"><span class = "S6"><span class="S0">reactions=Kba*Ua</span></span></div><div class="outputParagraph" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 14px;"><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="8731686E" data-testid="output_24" data-width="1480" data-height="150" style="width: 1510px; max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div class="textElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><span class="variableNameElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">reactions = </span></div><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">   1.0e+05 *

                   0
  -0.431474763406940
  -0.394424290220820
  -1.286474763406940
   1.286474763406940
   1.286474763406940
                   0
</div></div></div></div></div><div class = 'inlineWrapper outputs'><div class = "S5 lineNode"><span class = "S6"><span class="S0">reactions_glob = [reactions(1:4); 0 ;0;reactions(5:7)]</span></span></div><div class="outputParagraph" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 14px;"><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="5EC521CC" data-testid="output_25" data-width="1480" data-height="179" style="width: 1510px; max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div class="textElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><span class="variableNameElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">reactions_glob = </span></div><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">   1.0e+05 *

                   0
  -0.431474763406940
  -0.394424290220820
  -1.286474763406940
                   0
                   0
   1.286474763406940
   1.286474763406940
                   0
</div></div></div></div></div></div><div class = "S10"><span class = "S2"><span class="S0">Need to check the balance of forces ...</span></span></div><div class = 'CodeBlock contiguous'><div class = 'inlineWrapper outputs'><div class = "S5 lineNode"><span class = "S6"><span class="S0">balance_x=sum(reactions_glob([1,4,7])+f([1,4,7]))</span></span></div><div class="outputParagraph" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 14px;"><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="B84C2E2C" data-testid="output_26" data-width="1480" data-height="34" style="width: 1510px; max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div class="textElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><span class="variableNameElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">balance_x = </span></div><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">     0
</div></div></div></div></div><div class = 'inlineWrapper outputs'><div class = "S5 lineNode"><span class = "S6"><span class="S0">balance_z=sum(reactions_glob([2,5,8])+f([2,5,8]))</span></span></div><div class="outputParagraph" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 14px;"><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="D94B5C68" data-testid="output_27" data-width="1480" data-height="34" style="width: 1510px; max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div class="textElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><span class="variableNameElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">balance_z = </span></div><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">     0
</div></div></div></div></div><div class = 'inlineWrapper outputs'><div class = "S5 lineNode"><span class = "S6"><span class="S0">balance_my=sum(reactions_glob([3,6])+f([3,6]))-(reactions_glob(2)+f(2))*L </span><span class="S7">% chosing node 2 as pole</span></span></div><div class="outputParagraph" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 14px;"><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="84068B72" data-testid="output_28" data-width="1480" data-height="34" style="width: 1510px; max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div class="textElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;"><span class="variableNameElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">balance_my = </span></div><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12.4415998458862px;">     0
</div></div></div></div></div><div class = 'inlineWrapper'><div class = "S5 lineNode"><span class = "S6"><span class="S0"></span></span></div></div></div><div class = "S10"><span class = "S2"><span class="S0"></span></span></div></div></div>
<!-- 
##### SOURCE BEGIN #####
%% Assignement C2* correction by S. Coniglio & J. Morlier
%% May 2018

%Initialization of Variables
clear all; close all;
format long
Eb = 3.2e10; % Beam [Pa]
Ea = 2.0e11; % Bar [Pa]
L =3; % Beam [m]
h =0.3; % Beam [m]
Ap = h^2; % Beam [m*m]
I = h^4/12; %Beam [m^4]
Ab = .0025; % Bar [m*m]
Lb = L/2; % Bar [m]
q0 = 10e3; % N/m


% Stifness matrix Beam
Kf = Eb*I/L^3*[12	6*L	-12	6*L;
6*L 4*L^2 -6*L 2*L^2 ;-12 -6*L	12 -6*L;
6*L 2*L^2 -6*L 4*L^2];



%PART1
F=[0 0 -75000 0]';

%Reduced system to solve in the global/local axis
K1=Kf(3:4,3:4); %MN/m
F1=F(3:4);
U1=K1\F1;
U1(1)%m;
U1(2)%rad;				
%% 
% _v _= −_3.125 cm_
% 
% θ = −_1.563 10_−_2 rad _
% 
% 

%Check the reaction forces
Ue=[0 0 U1']'
Fe=Kf*Ue					
%% 
%  _Rz = 75 KN and_ _My = 225 KNm (75KN _× _3m) _
% 
% 



%PART2
warning q0 is in KN/m
%% 
% 
% 
% Part of the job was to find equivalence forces for the distributed load 
% ! see class exercice and script on github. You can find the results in the next 
% figure.
% 
% Then discretize the structure use only 2 elements: 1 beam and 1 bar.
% 
% 

  
% Stiffness matrix beam
Kf = Eb*I/L^3*[12	6*L	-12	6*L;
6*L 4*L^2 -6*L 2*L^2 ;-12 -6*L	12 -6*L;
6*L 2*L^2 -6*L 4*L^2];

% add axial behaviour
Ka=Eb*Ap/L*[1 -1; -1 1];
% axial bending behaviour
Kp([ 2 3 5 6 ] , [2 3 5 6 ]) = Kf; Kp([1 4], [1 4 ]) = Ka;
% augmnented bar 
Kb = zeros(6); Kb([1 4 ], [1 4]) =Ea*Ab/Lb*[ 1 -1; -1 1]

%Rotation (45)
c = sqrt(1/2); s = sqrt(1/2); r=[c s 0;
    -s c 0;
0 0 1];

R = kron(eye(2),r); %Simpliciation
Kb=(R)'*Kb*R;

% Assembly
K = zeros(9);
K(1:6 , 1:6 ) = K(1:6 , 1:6 )+Kp
K(4:9 , 4:9 ) = K(4:9 , 4:9 )+Kb

% BCs
%% 
% 	The obvious support conditions are at node 1 and 3, i.e. _u_1_Z _= 0, 
% φ1_Y _= 0 and _u_3_X _= _u_3_Z _= 0. However, it is also important to consider 
% that the beam cannot have anyelongationinthe_X_-directionatnode2:_u_2_X _=0. 
% 
% 	

i=[1,2,3,4,7,8,9];
Kreduced=K;
Kreduced(:,i) = []; 
Kreduced(i,:) = []
%% 
% Handwritten gives K_theory
% 
% 

K_theory=[(12*Eb*I/(L^3))+(Ea*Ab)/(L) -6*Eb*I/(L^2); -6*Eb*I/(L^2) 4*Eb*I/(L)]
f = [ 0;0;0;0 ;-75e3 + -7*q0*L/20 ; -1*q0*L*L ;0 ;0 ;0];%Assembly of ecternal forces
freduced=[-75e3 + -7*q0*L/20 ; -1*q0*L*L]
Ureduced = Kreduced\freduced%solution
%% 
% _Stiff ! isn't it?_

U_theory = K_theory\freduced  %solution
%% 
% 
% 
% Internal forces:
% 
% Here we compute the internal force in the global coordinate system

Fbeam = Kp * [0 0 0 0 Ureduced' ]' %[Fx1 Fy1 Mz1 Fx2 Fy2 Mz2]
%% 
% Beam in compression -43kN

Fbar = Kb * [ 0 Ureduced' 0 0 0]' %[Fx2 Fy2 Mz2 Fx3 Fy3 Mz3]
%% 
% To know the bar stress state one can compute the local displacement using 
% the rotation matrix that traduces the bar global displacement into the local 
% one.

ub_local=R*[ 0 Ureduced' 0 0 0]' %[ul1 vl1 thetal1 ul2 vl2 thetal12] where l1==2 and l2==3
%% 
% the axial displacements necessary for the bar internal stress post processig 
% are the only components 1 and 4:

ub_axial=ub_local([1,4]) %[ul1 ul2]
%% 
% the bar axial deformation $\varepsilon_{xx} =Bu$  can be computed using 
% the strain displacement matrix (introduced during lectures):

B_bar=[-1/Lb 1/Lb]; % strain displacement matrix of the linear bar element
eps_bar=B_bar*ub_axial
%% 
% That means that the bar is in traction, for the stress $\sigma_{xx} =E\varepsilon_{xx}$ 
% (the stress strain matrix D here is a scalar):

sigma_bar=Eb*eps_bar %Pa
%% 
% finally the normal load is $N=A\sigma_{xx}$

InternalFbar= Ab*sigma_bar %N
%% 
% The Bar is in traction  state 29KN are applied to both extremities in 
% opposite directions along the bar axis direction. 

%partionned
%   Special case: ALL imposed displacements are zero 
% (Ub = 0)
freedofs=[5:6];
constraineddofs=[1:4 7:9];
Kaa=K(freedofs,freedofs)
Kba=K(constraineddofs,freedofs)
fa=f(freedofs)
Ua=inv(Kaa)*fa
reactions=Kba*Ua
reactions_glob = [reactions(1:4); 0 ;0;reactions(5:7)]
%% 
% Need to check the balance of forces ...

balance_x=sum(reactions_glob([1,4,7])+f([1,4,7]))
balance_z=sum(reactions_glob([2,5,8])+f([2,5,8]))
balance_my=sum(reactions_glob([3,6])+f([3,6]))-(reactions_glob(2)+f(2))*L % chosing node 2 as pole

%% 
%
##### SOURCE END #####
--></body></html>